﻿<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery MultiSelect Widget Demo</title>
<link rel="stylesheet" type="text/css" href="multiselectSrc/jquery.multiselect.css" />
<link rel="stylesheet" type="text/css" href="assets/style.css" />
<link rel="stylesheet" type="text/css" href="assets/prettify.css" />
<link rel="stylesheet" type="text/css" href="/css/jquery-ui.css" />
<script type="text/javascript" src="/js/jquery-1.7.1.js"></script>

<script type="text/javascript" src="ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="assets/prettify.js"></script>
<script type="text/javascript" src="multiselectSrc/jquery.multiselect.js"></script>
<script type="text/javascript">
$(function(){
    $("select").multiselect({
        noneSelectedText: "==请选择==",
        checkAllText: "全选",
        uncheckAllText: '全不选',
        selectedList:4
    });
});
function showValues() {
    var valuestr = $("#sela").multiselect("MyValues");
    alert(valuestr);
}
</script>
</head>
<body id="test" onload="prettyPrint();">

<h2>Basic Demos</h2>

<p>Both multiselects are created with the following one-liner.  Optgroup support is built in out of the box:</p>
<pre class="prettyprint">
$(function(){
   $("select").multiselect(); 
});
</pre>
    <button onclick="showValues()">显示选取的值</button>
<h3>Basic</h3>
<p>
	<select id ="sela" title="Basic example" multiple="multiple" name="example-basic" size="5">
	<option value="V1">Option 1</option>
	<option value="V2">Option 2</option>
	<option value="V3">Option 3</option>
	<option value="option4">Option 4</option>
	<option value="option5">Option 5</option>
	<option value="option6">Option 6</option>
	<option value="option7">Option 7</option>
	<option value="option8">Option 8</option>
	<option value="option9">Option 9</option>
	<option value="option10">Option 10</option>
	<option value="option11">Option 11</option>
	<option value="option12">Option 12</option>
	</select>
</p>

<h3>With Optgroups</h3>
<p>Click on an optgroup's heading to toggle the checked state of the entire group.</p>
<p>
	<select name="example-optgroup" multiple="multiple" size="5">
	<optgroup label="Group One">
		<option value="option1">Option 1</option>
		<option value="option2">Option 2</option>
		<option value="option3">Option 3</option>
	</optgroup>
	<optgroup label="Group Two">
		<option value="option4">Option 4</option>
		<option value="option5">Option 5</option>
		<option value="option6">Option 6</option>
		<option value="option7">Option 7</option>
	</optgroup>
	</select>
</p>

</body>
</html>
